import { createNamespacedHelpers } from "vuex";

const { mapState, mapMutations } = createNamespacedHelpers("editor");

import lcd_engine from "@/lcd.engine.js";

const { tooler } = lcd_engine;

export default {
  data() {
    return {
      tooler
    };
  },
  computed: {
    ...mapState([
      "schema", 
      "canvasImg", 
      "getComponentList",
      "canvasStyle"
    ]),
  },
  methods: {
    ...mapMutations([
      ...Object.values(tooler).map((m) => m.trigger.name),
      "handleThumbnail",
      "handleViewId",
      "handleMeta",
      'handleCover',
      "handleReset"
    ]),
  },
};